<!--
 * @Author: yuqy
 * @Date: 2023-04-10 19:26:39
 * @LastEditors: yuqy
 * @LastEditTime: 2023-10-13 15:28:46
 * @Descripttion: -
-->
<script setup>
  import { Button, Table, Icon, Message } from 'view-ui-plus';
  import HelloWorld from '@/components/HelloWorld.vue'
  import { useStore } from 'vuex'
  import { ref } from 'vue'
  const store = useStore()
  const count = ref(0)
  const clicks = () => {
    Message.info('This is a info tip')
  }
  const loginOut = () => {
    store.dispatch('loginOut')
  }
  // 加载框操作
  const setLoading = ()=> {
    // 开启加载框
    store.commit('updateLoading', true)
    // 关闭加载框
    // store.commit('updateLoading', false)
    // 开启antdegsin 加载框
    store.commit('updateMessageLoading', true)
    // 关闭antdegsin 加载框
    // store.commit('updateMessageLoading', false)
  }
</script>
<template>
  <div class="login_wrap">
      <HelloWorld></HelloWorld>
      <p>最强地级市”迎来新任市委书记   42px</p>
      <h2>我是主页哦</h2>
      <router-link to='/login'> 
        <v-btn color='red'>我要去登录哦</v-btn>
      </router-link>
      <router-link to='/test'> 
        <v-btn color='red'>我要去测试页面</v-btn>
      </router-link>
      <hr />
      <br />
      <router-link to='/demo'> 
        <v-btn color='red'>我要去demo功能页面</v-btn>
      </router-link>
      
      <router-link to='/demoSet'> 
        <v-btn color='red'>我要去demoSet功能页面</v-btn>
      </router-link>
      <br />

      <Button type="info">Info</Button>
      <Button type="success">Success</Button>
      <Button type="warning" @click="setLoading">Warning</Button>
      <Button type="error" @click="clicks">Error</Button>
      <Icon type="ios-checkmark" size='48'/>
      <Icon type="ios-checkmark" size='48'/>
      <Button type="error" @click="loginOut">退出登录</Button>
  </div>
</template>
<style scoped>
.login_wrap {
  background: yellow;
  height: 100vh;
}
p {
  font-size: 42px; 
  font-weight: 900;
}
</style>
